package oop.java0328.work1;

public class Teacher {
    private String name;
    private int age;
    private int workYear;//教龄
    private String gender;

    public Teacher() {
    }

    public Teacher(String name, int age, int workYear, String gender) {
        this.name = name;
        this.age = age;
        this.workYear = workYear;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getWorkYear() {
        return workYear;
    }

    public void setWorkYear(int workYear) {
        this.workYear = workYear;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    //自我介绍
    public void selfIntroduce() {
        System.out.println("name:" + name + "gender:" + gender + ",age:" + age + "岁，worktime:" + workYear + "年");
    }

    //上课
    public void giveLession() {
        System.out.println("上课");
    }

}
